<!DOCTYPE html>
<html>
	<head>
		<title>登录</title>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<link rel="stylesheet" type="text/css" href="../../css/login/login_icon.css" />
		<link rel="stylesheet" type="text/css" href="../../css/login/main.css">
		<script src="../../layui/layui.js" type="text/javascript" charset="utf-8"></script>
	</head>

	<body>
		<div class="login1" id="login1">
			<div class="container-login100">
				<div class="wrap-login100">
					<div class="login100-pic js-tilt" data-tilt>
						<img src="../../img/img-01.png" alt="IMG">
					</div>

					<form class="login100-form validate-form">
						<span class="login100-form-title">
							登录
						</span>

						<div class="wrap-input100 validate-input">
							<input class="input100" type="tel" name="phone" id="phone" placeholder="电话号码">
							<span class="focus-input100"></span>
							<span class="symbol-input100">
								<i class="iconfont icon-hezuo"></i>
							</span>
						</div>

						<div class="wrap-input100 validate-input">
							<input class="input100" type="password" name="pass" id="pwd" placeholder="密码">
							<span class="focus-input100"></span>
							<span class="symbol-input100">
								<i class="iconfont icon-mima"></i>
							</span>
						</div>

						<div class="container-login100-form-btn">
							<button class="login100-form-btn" id="login">
								登录
							</button>
						</div>

						<span class="text-center txt3" id="msg">
						</span>

						<div class="text-center1">
							<a class="txt2" href="/html/login/register.html">
								还没有账号？立即注册
							</a>
						</div>
					</form>
				</div>
			</div>
			<canvas id="canvas2d" ></canvas>
		</div>
		<script src="../../js/jq22.js" type="text/javascript" charset="utf-8"></script>
	</body>
	<script src="../../js/jquery3.js"></script>

<script>
	$("#login").click(function (){
		let phone = $("#phone").val();
		let pwd = $("#pwd").val();

		$.post("/user/login",{"phone":phone,"pwd":pwd},function (res){
			if (res=="success"){
				location.href="/html/index.html"
			}else{
				$("#msg").html("<center>输入错误，请重新输入</center>");
			}
		});
		return false;

	})
</script>
</html>
